package com.power.project.service.impl;

import com.power.project.dao.HaAttachmentDao;
import com.power.project.model.HaAttachment;
import com.power.project.service.HaAttachmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 附件业务层实现
 */
@Service
public class HaAttachmentServiceImpl implements HaAttachmentService {

    @Autowired
    private HaAttachmentDao dao;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void save(HaAttachment attachment) {
        dao.save(attachment);
    }

    @Override
    public HaAttachment getById(Integer id) {
        return dao.getById(id);
    }
}
